<script setup lang="ts">
import { reactive, onMounted } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();

const state = reactive({
  overlayShow: false,
  panelHeight: Math.round(0.6 * window.innerHeight),
});

onMounted(() => {
  state.overlayShow = true;
  setTimeout(() => {
    state.overlayShow = false;
  }, 200);
});
</script>

<template>
  <div class="bg-img">
    <img src="@/assets/image/plan/save_plan.png" />
    <div
      class="navigateBack"
      @click="
        () => {
          router.go(-1);
        }
      "
    ></div>
  </div>
  <van-overlay :show="state.overlayShow">
    <van-loading class="wrapper" type="spinner" />
  </van-overlay>
</template>
<style scoped lang="scss">
.bg-img {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
  img {
    width: 100%;
    height: 100%;
  }
  .search {
    display: flex;
    justify-content: center;
    width: 100%;
    position: absolute;
    top: 26px;
  }
  .search_box {
    width: 95%;
  }
  .navigateBack {
    position: absolute;
    top: 29px;
    left: 12px;
    width: 40px;
    height: 50px;
    background-color: transparent;
  }
  .footer {
    position: absolute;
    width: 100%;
    bottom: 0px;
    .my-swipe .van-swipe-item {
      color: #fff;
      font-size: 20px;
      line-height: 150px;
      text-align: center;
      background-color: #39a9ed;
    }
  }
}
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.panel_content {
  padding: 0 20px;
  color: #3a3a3a;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  .header {
    width: 100%;
    padding-bottom: 3px;
    span {
      font-weight: bold;
      font-size: 18px;
    }
  }
  .sub_header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #595959;
    span {
      font-weight: bold;
    }
    .date {
      display: flex;
      align-items: center;
      font-weight: bold;
    }
    img {
      width: 28px;
      height: 28px;
    }
  }
  .content {
    box-sizing: border-box;
    padding: 12px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    // justify-content: center;
    align-items: center;
    img {
      width: 60%;
      height: auto;
    }
    p {
      font-size: 20px;
      font-weight: bold;
    }
    span {
      color: #595959;
    }
  }
  .footer_box {
    width: 100%;
    display: flex;
    justify-content: space-around;
  }
}
</style>
